let express = require('express');
let router = express.Router();
let WeChatPayAction = require('../../action/weChatPayAction');

/* GET users listing. */
router.post('/create', function (req, res, next) {
    req.body.RechargeStatus = 'WAIT';
    req.body.RechargeTradeNo = Date.now();
    console.log(req.connection.remoteAddress.substr(7));
    req.body.RechargeCreateIp = req.connection.remoteAddress.substr(7);
    req.body.CreatedAt = new Date();
    WeChatPayAction.createOrder(req.body).then(res.res,res.rej);
});
module.exports = router;